package com.tanhua.server.controller;

import com.tanhua.server.service.RecommendUserInfoService;
import com.tanhua.server.vo.PageResult;
import com.tanhua.server.vo.RecommendUserQueryParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName :  RecommendUserInfo
 * @Author : Tenebrous
 * @Date: 2020/12/11 14:05
 * @Description : 推荐朋友表现层
 */
@RestController
@RequestMapping("tanhua")
public class RecommendUserInfo {

    @Autowired
    private RecommendUserInfoService recommendUserInfoService;

    /**
     * 前端获取后台推荐用户的信息
     * @param queryParam    推荐用户查询的条件
     * @param token         用户登录时携带的token
     * @return              返回最终推荐用户的信息
     */
    @GetMapping("recommendation")
    public PageResult queryRecommendUserList(RecommendUserQueryParam queryParam, @RequestHeader("Authorization") String token) {
        return this.recommendUserInfoService.queryRecommendUserList(queryParam, token);
    }

}
